import loginReducer, {ILoginReducerState} from "@/stores/reducers/loginReducers";
import userInfoReducer, {IUserInfoReducersState} from "@/stores/reducers/userInfoReducers";
import {connectRouter} from "connected-react-router";
import {createBrowserHistory} from "history";
import {combineReducers} from "redux";

export const history = createBrowserHistory();

export interface IAppState {
    login: ILoginReducerState
    userInfo: IUserInfoReducersState
    router: any
}

const rootReducer = combineReducers({
    router: connectRouter(history),
    login: loginReducer,
    userInfo: userInfoReducer,
})

export default rootReducer;
